<!DOCTYPE html>
<html>
	<head>
	    <meta charset="UTF-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
	    <title>Ta的商品</title>
	    <link href="../css/mui.min.css" rel="stylesheet"/>
	    <link rel="stylesheet" type="text/css" href="../fonts/iconfont/iconfont.css"/>
	    <link rel="stylesheet" type="text/css" href="../css/global.css"/>
	    <link rel="stylesheet" type="text/css" href="../css/pullToRefresh.css" />
	    <style type="text/css">
	    	.user{width: 55%;}
	    	.user span{width: 68%;display: inline-block;}
	    </style>
	</head>
	<body ng-app="app" ng-controller="myController">
	    <header class="mui-bar mui-bar-nav bg_white">
	        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	        <h1 class="mui-title colorP">Ta的商品</h1>
	    </header>
		<div class="mui-content">
			<div></div>
			<ul class="mui-table-view margin-bottom5px bg_white" ng-repeat="(key,res) in info">
	            <li ng-repeat="(key,vo) in res" class="mui-table-view-cell mui-media">
	                <a href="javascript:;" ng-click="comein(vo.uid,vo.type,vo.id)">
	                    <img class="mui-media-object mui-pull-left goods_pic" ng-src="{{vo.good_image}}">
	                    <div class="mui-media-body">
	                     	<div class="mui-ellipsis">{{vo.good_name}}</div>
	                     	<div class="mui-clearfix"><span class="mui-pull-right colorP">工期：<i>{{vo.maf_time}}</i>天</span></div>
	                     	<div class="mui-clearfix">
	                     		<div class="mui-pull-left user">
	                     			<div class="user_pic"><img ng-src="{{icon}}" /></div>
									<span class="padding_l line-height30px color999 mui-ellipsis">{{nick}}</span>
	                     		</div>
	                     		<span class="mui-pull-right colorRed line-height30px">￥{{vo.price}}</span>
	                     	</div>
	                    </div>
	                </a>
	            </li>
	        </ul>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/mui.pullToRefresh.js"></script>
	<script src="../js/mui.pullToRefresh.material.js"></script>
	<script src="../js/open.js"></script>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/angular.min.js"></script>
	<script src="../js/apppublic.js"></script>
	<script src="../js/app/somebody_goods.js"></script>		
	<script type="text/javascript">
		(function($) {
			//阻尼系数
			var deceleration = mui.os.ios ? 0.003 : 0.0009;
			$('.mui-scroll-wrapper').scroll({
				bounce: false,
				indicators: false, //是否显示滚动条
				deceleration: deceleration
			});

			$.ready(function() {
				//循环初始化所有下拉刷新，上拉加载。
				$.each(document.querySelectorAll('.mui-content'), function(index, pullRefreshEl) {
					$(pullRefreshEl).pullToRefresh({
						down: {
							callback: function() {
								var self = this;
								setTimeout(function() {
									loadNews();
									self.endPullDownToRefresh();
								}, 1000);
							}
						},
						up: {
							callback: function() {
								var self = this;
								getValue();
								setTimeout(function() {
									self.endPullUpToRefresh();
								}, 1000);
							}
						}
					});
				});
			});
		})(mui);
		
		
		function loadNews(){
			var allocation = document.querySelector('[ng-controller=myController]');
			$scope = angular.element(allocation).scope();
			page = 1;
			res=[];
			noMore = false;
			$scope.initView();
			$scope.$apply();
		}
		function getValue(){
			var allocation = document.querySelector('[ng-controller=myController]');
			$scope = angular.element(allocation).scope();
			page++;
			$scope.initView();
			$scope.$apply();
		}
	</script>
</html>
